#!/bin/bash
function collect {
   head -$1 out/kb.txt >> $2
}

rm -f /home/bentenin/mshmoh-sff.txt
for i in md083 md084 md085 md086 md087 md088 
do
   cd /home/bentenin/gromacs/mshmoh/siepmann/$i
   collect 8 /home/bentenin/mshmoh-sff.txt
done

rm -f /home/bentenin/mshmoh-skb.txt
for i in md105 md106 md107 md108 md109 md110 md111
do
   cd /home/bentenin/gromacs/mshmoh/skb/$i
   collect 8 /home/bentenin/mshmoh-skb.txt
done

rm -f /home/bentenin/msmmoh-sff.txt
for i in md089 md090 md091 md092 md093 md094 md095
do
   cd /home/bentenin/gromacs/msmmoh/siepmann/$i
   collect 8 /home/bentenin/msmmoh-sff.txt
done

rm -f /home/bentenin/msmmoh-skb.txt
nlines=4
cd /home/bentenin/gromacs/msmmoh/x0125/md062
collect $nlines /home/bentenin/msmmoh-skb.txt
cd /home/bentenin/gromacs/msmmoh/x0750/md063
collect $nlines /home/bentenin/msmmoh-skb.txt
cd /home/bentenin/gromacs/msmmoh/x0250/md064
collect $nlines /home/bentenin/msmmoh-skb.txt
cd /home/bentenin/gromacs/msmmoh/x0625/md065
collect $nlines /home/bentenin/msmmoh-skb.txt
cd /home/bentenin/gromacs/msmmoh/x0375/md066
collect $nlines /home/bentenin/msmmoh-skb.txt
cd /home/bentenin/gromacs/msmmoh/x0500/md067
collect $nlines /home/bentenin/msmmoh-skb.txt
cd /home/bentenin/gromacs/msmmoh/x0875/md068
collect $nlines /home/bentenin/msmmoh-skb.txt
